package com.hgd.tools;

import java.util.Date;

public class RunTime implements Comparable{
	private Date settingTime = new Date(); 
	private Long usingTime;
	
	public Date getSettingTime() {
		return settingTime;
	}
	public void setSettingTime(Date settingTime) {
		this.settingTime = settingTime;
	}
	public long getUsingTime() {
		return usingTime;
	}
	public void setUsingTime(long usingTime) {
		this.usingTime = usingTime;
	}
	public int compareTo(Object o) {
		RunTime runTime = (RunTime) o;
		int result  = this.settingTime.before(runTime.settingTime)?1:(this.settingTime==runTime.settingTime?0:-1);		
		if (result==0) {
			result = this.usingTime.compareTo(runTime.usingTime);
		}		
		return result;
	}
	
}
